package com.jrx.anytxn.reporting.mapper.ext;

import com.jrx.anytxn.reporting.entity.MrLoanAccountInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ExtMrLoanAccountInfoMapper {
    /**
     * 更新账户信息表
     * @param mrLoanAccountInfo
     * @return
     */
    int updateByLoanIdSelective(MrLoanAccountInfo mrLoanAccountInfo);

    /**
     *
     * @param customerId 客户id
     * @param loanId 借款id
     * @param tenantId 租户is
     * @param beginDate 开始时间
     * @param endDate 结束时间
     * @return
     */
    List<MrLoanAccountInfo> selectLoansByCusIdAndLoanId(@Param("channel")String channel,@Param("customerId") String customerId, @Param("loanId")String loanId,@Param("tenantId") String tenantId,@Param("beginDate") String beginDate,@Param("endDate") String endDate);

    /**
     * 根据租户id，客户id以及借款id查询借款记录
     * @param channel 渠道
     * @param customerId 客户id
     * @param loanId 借款id
     * @param tenantId 租户id
     * @return
     */
    MrLoanAccountInfo selectLoanByCusIdAndLoanId(@Param("channel")String channel,@Param("customerId") String customerId, @Param("loanId")String loanId,@Param("tenantId") String tenantId);

    /**
     * 根据业务日期查询
     * @param businessDate
     * @return
     */
    List<MrLoanAccountInfo> selectByBusinessDate(@Param("businessDate") Date businessDate);

}
